package split

import (
	"strings"
)

func Spilt(s, sep string) []string {
	index := strings.Index(s, sep)
	result := []string{}
	for index > -1 {
		if index != 0 {
			result = append(result, s[:index])
		}
		s = s[index+len(sep):]
		index = strings.Index(s, sep)
	}
	result = append(result, s)
	return result
}

func CountStrArr(strArr []string) int {
	return len(strArr)
}
